<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>学生列表</title>
</head>
<body>
	<table border="1">
		<thead>
			<tr>
				<td align="center">ID</td>
				<td align="center">用户名</td>
				<td align="center">姓 名</td>
				<td align="center">性别</td>
				<td align="center">专 业</td>
			</tr>
		</thead>
		<c:forEach items="${students }" var="student">
			<tr>
				<td align="center">${student.id }</td>
				<td align="center">${student.username }</td>
				<td align="center">${student.realName }</td>
				<td align="center">
					<c:choose>
						<c:when test="${student.sex == true }">男</c:when>
						<c:otherwise>女</c:otherwise>
					</c:choose>
				</td>
				<td align="center">${student.major.name }</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>